<template>
  <div>
    <video
      id="videoooo"
      style="width: 100%;object-fit='fill'"
      :preload="videoInfo.preload"
      :poster="videoInfo.videoImg"
      :controls="videoInfo.controls"
      :autoplay="videoInfo.autoplay"
      muted="muted"
      src=""
    >
      <source type="video/mp4" />
    </video>
  </div>
</template>

<script>
import { getCurrentInstance } from "vue";
import { reactive } from "@vue/reactivity";
export default {
  setup() {
    const { ctx, proxy } = getCurrentInstance();
    function handleClick() {
      proxy.$router.push("/user/userCourse");
    }
    const videoInfo = reactive({
      playStatus: "",
      muteStatus: "",
      isMute: true,
      isPlay: false,
      preload: "auto", //  建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
      controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件，启动视频播放的唯一方法是使用autoplay属性或通过Player API。
      autoplay: "",
    });
    return {
      handleClick,
      videoInfo,
    };
  },
  props: {
    data: {
      type: Object,
      default() {
        return {};
      },
    },
  },

  // 自动播放属性,muted:静音播放
  // autoplay: 'muted',
};
</script>

<style scoped >
</style>

